# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppRequest do
  @moduledoc """
  Details of an app installation request.

  ## Attributes

  *   `appDetails` (*type:* `String.t`, *default:* `nil`) - Output only. Format: app_details=customers/{customer_id}/apps/chrome/{app_id}
  *   `appId` (*type:* `String.t`, *default:* `nil`) - Output only. Unique store identifier for the app. Example: "gmbmikajjgmnabiglmofipeabaddhgne" for the Save to Google Drive Chrome extension.
  *   `detailUri` (*type:* `String.t`, *default:* `nil`) - Output only. The uri for the detail page of the item.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Output only. App's display name.
  *   `iconUri` (*type:* `String.t`, *default:* `nil`) - Output only. A link to an image that can be used as an icon for the product.
  *   `latestRequestTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp of the most recently made request for this app.
  *   `requestCount` (*type:* `String.t`, *default:* `nil`) - Output only. Total count of requests for this app.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :appDetails => String.t() | nil,
          :appId => String.t() | nil,
          :detailUri => String.t() | nil,
          :displayName => String.t() | nil,
          :iconUri => String.t() | nil,
          :latestRequestTime => DateTime.t() | nil,
          :requestCount => String.t() | nil
        }

  field(:appDetails)
  field(:appId)
  field(:detailUri)
  field(:displayName)
  field(:iconUri)
  field(:latestRequestTime, as: DateTime)
  field(:requestCount)
end

defimpl Poison.Decoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppRequest do
  def decode(value, options) do
    GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppRequest.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ChromeManagement.V1.Model.GoogleChromeManagementV1ChromeAppRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
